class DataIntegrator:
	dataList = []

	def __init__(self):
		pass

	def bindData(self, dataList: list, dataType: str):
		for data in dataList:
			index = self.getIndexById(data['id'])
			if index != -1:
				self.dataList[index].update(
					{
						dataType: data['content']
					}
				)
			else:
				self.dataList.append(
					{
						'id': data['id'],
						dataType: data['content']
					}
				)

	def getData(self):
		return self.dataList

	def getIndexById(self, dataId):
		for (i, data) in enumerate(self.dataList):
			if dataId == data['id']:
				return i
		return -1
